import 'package:json_annotation/json_annotation.dart';
import 'package:casdon/modules/device/data/api/ecology_result_data.dart';

part 'ecology_openness_authenticate_api.g.dart';

@JsonSerializable()
class EcologyOpennessAuthenticateModel {
  @JsonKey(name: 'code')
  final int code;

  @JsonKey(name: 'result')
  final EcologyResultData? result;

  @JsonKey(name: 'message')
  final String? message;

  @JsonKey(name: 'requestId')
  final String? requestId;

  @JsonKey(name: 'success')
  final bool success;

  factory EcologyOpennessAuthenticateModel.fromJson(Map<String, dynamic> json) =>
      _$EcologyOpennessAuthenticateModelFromJson(json);

  Map<String, dynamic> toJson() => _$EcologyOpennessAuthenticateModelToJson(this);

  EcologyOpennessAuthenticateModel({
    required this.code,
    this.result,
    this.message,
    this.requestId,
    required this.success,
  });
}

